package com.dz.mapper;

import com.github.pagehelper.Page;
import com.dz.annotation.AutoFill;
import com.dz.dto.SetmealPageQueryDTO;
import com.dz.entity.SetMeal;
import com.dz.entity.SetmealDish;
import com.dz.enumeration.OperationType;
import com.dz.vo.SetmealPageVo;
import com.dz.vo.SetmealVO;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @author 鄧浩奇
 * @classname SetMealMapper
 * @description
 * @since 2023/12/20 21:57
 **/

@Mapper
public interface SetMealMapper {

    List<SetMeal> selectByCategoryId(Long categoryId);

    @AutoFill(OperationType.INSERT)
    Integer insertSetmeal(SetMeal setMeal);

    Integer insertSetmailDishBatch(List<SetmealDish> setmealDishes);

    Page<SetmealPageVo> getPage(SetmealPageQueryDTO queryDTO);

    SetmealVO selectById(Long id);

    List<SetmealDish> selectListById(Long id);

    @AutoFill(OperationType.UPDATE)
    Integer update(SetMeal setMeal);

    Integer deleteSetmealDishBySetmealId(Long setmealId);

    Integer deleteBatch(List<Long> canDeleteIdList);

    @AutoFill(OperationType.UPDATE)
    void updateStatus(SetMeal setMeal);
}
